<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        const users = {
  Alex: {
    email: 'alex@alex.com',
    skills: ['HTML', 'CSS', 'JavaScript'],
    age: 20,
    isLoggedIn: false,
    points: 30
  },
  Asab: {
    email: 'asab@asab.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'Redux', 'MongoDB', 'Express', 'React', 'Node'],
    age: 25,
    isLoggedIn: false,
    points: 50
  },
  Brook: {
    email: 'daniel@daniel.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux'],
    age: 30,
    isLoggedIn: true,
    points: 50
  },
  Daniel: {
    email: 'daniel@alex.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'Python'],
    age: 20,
    isLoggedIn: false,
    points: 40
  },
  John: {
    email: 'john@john.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux', 'Node.js'],
    age: 20,
    isLoggedIn: true,
    points: 50
  },
  Thomas: {
    email: 'thomas@thomas.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'React'],
    age: 20,
    isLoggedIn: false,
    points: 40
  },
  Paul: {
    email: 'paul@paul.com',
    skills: ['HTML', 'CSS', 'JavaScript', 'MongoDB', 'Express', 'React', 'Node'],
    age: 20,
    isLoggedIn: false,
    points: 40
  }
}   
    //统计在线人数
//     const namearr = Object.keys(users)
//     const namearr1 = Object.values(users)
//     console.log(namearr);
//     var sum=0
//     for (let index = 0; index < namearr.length; index++) {
//         if (namearr1[index].isLoggedIn==true) {
//             sum++
//         }
       
//     }
// console.log(sum);
    //.统计分数大于50的人数
//     const pointarr = Object.keys(users)
//     const pointarr1 = Object.values(users)
 
//     var sum=0
//     for (let index = 0; index < pointarr.length; index++) {
//         if (pointarr1[index].points>50) {
//             sum++
//         }
       
//     }
// console.log(sum);
    //.查找会MongoDB的人，并打印其名字
    // const skillarr = Object.keys(users)
    // const skillarr1 = Object.values(users)
    // for (let index = 0; index < skillarr.length; index++) {
    //     for (let m = 0; m < skillarr1.length; m++) {
         
    //          if (skillarr1[index].skills[m]=='MongoDB') {
    //                 console.log(skillarr[index]);
    //     }
    //     }
       
       
    // }
        //查找同时会：MongoDB，，React，和Node 的人，并打印其名字
    //     const skillarr = Object.keys(users)
    // const skillarr1 = Object.values(users)
    // var cont =0
    // for (let index = 0; index < skillarr.length; index++) {
    //     for (let m = 0; m < skillarr1[index].skills.length; m++) {
    //          if (skillarr1[index].skills[m]=='MongoDB'||skillarr1[index].skills[m]=='Express'
    //          ||skillarr1[index].skills[m]=='React'||skillarr1[index].skills[m]=='Node') {
    //                 cont++
    //      }
    //     }
       
    //     if(cont==4){
    //     console.log(skillarr[index]);
    //    }
    // } 

    </script>
</body>
</html>